package com.bhsy.hellobootspring;

import com.bhsy.hellobootspring.servlet.LoginServlet;
import com.bhsy.hellobootspring.servlet.UserAdd;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.ServletRegistration;

@Configuration
public class Servlet_xml
{
    @Bean
    public ServletRegistrationBean addUserServlet()
      {
        return new ServletRegistrationBean(new UserAdd(),"/add");
      }
    @Bean
    public ServletRegistrationBean addLoginServlet()
      {
        return new ServletRegistrationBean(new LoginServlet(),"/login");
      }
}
